#ifndef __ROCKETRESPONSE_H
#define __ROCKETRESPONSE_H

#include <e32base.h>

#include <xml\contenthandler.h> // for MContentHandler
#include <xml\parser.h> // for CParser

class CRocketResponse : public CBase, public Xml::MContentHandler
{
public:
	CRocketResponse();
	virtual ~CRocketResponse();
	
public:
	virtual TBool	 Decode(RBuf8& aBuffer);
	
protected:
	void OnStartDocumentL(const Xml::RDocumentParameters& /*aDocParam*/,
							TInt aErrorCode);
	void OnEndDocumentL(TInt aErrorCode);
	void OnStartElementL(const Xml::RTagInfo& aElement,
							const Xml::RAttributeArray& aAttributes,
							TInt aErrorCode);
	void OnEndElementL(const Xml::RTagInfo &aElement, 
										TInt aErrorCode);
	void OnContentL(const TDesC8 &aBytes, TInt aErrorCode);
	void OnStartPrefixMappingL(const RString& /*aPrefix*/,
										const RString& /*aUri*/,
										TInt aErrorCode);
	void OnEndPrefixMappingL(const RString& /*aPrefix*/,
											  TInt aErrorCode);
	void OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/,
												 TInt aErrorCode);
	void OnSkippedEntityL(const RString& /*aName*/, 
										   TInt aErrorCode);
	void OnProcessingInstructionL(const TDesC8& /*aTarget*/,
										const TDesC8& /*aData*/,
										TInt aErrorCode);
	void OnError(TInt aErrorCode);
	TAny* GetExtendedInterface(const TInt32 /*aUid*/);
	
protected:
	TInt			iNumber;
	TInt			iReturnNumber;
	
	Xml::CParser*	iParser;
	TBuf<20>		iInterfaceNo;
};

#endif
